<?php
class info{
    public  $name;
    public $pwd;
    public $email;
    public function __set($name, $value) {
        $this->$name= $value;
    }
    public function __get($name) {
        if(!isset($this->name)){
            $this->name=NULL;
        }
}
}
$i=new info();
$i->name='wangxiaoqin--';
$i->pwd='iloveyou--';
$i->email='iloveyou@gf.com--';
interface iMember
{
    public function login(info $i);
    public function reg(info $i);
}
class member extends info implements iMember{
    public function login(info $i){
        var_dump($i);
        echo 'login--',$i->name,$i->pwd,$i->email,'<br />';
    }
    public function reg(info $i){
         echo 'reg--',$i->name,$i->pwd,$i->email,'<br />';
    }
}
class admin implements iMember{
    public function login(info $i){
        echo 'admin login--',$i->name,$i->pwd,'<br />';
    }
    public function reg(info $i){
         echo 'admin reg--',$i->name,$i->pwd,'<br />';
    }
}
$m=new member();
$m->login($i);
function L(iMember $p,info $i) {
    $p->login($i);
}
$n=new admin();
$i2=new info();
$i2->name='Y is--';
$i2->pwd='my wife--';
$i2->email='gf@love.cn--';
L($n,$i2);